package com.zimmur.service.impl.base;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zimmur.dao.base.IExpressDao;
import com.zimmur.model.base.Express;
import com.zimmur.service.base.IExpressService;

@Service("expressService")
public class ExpressServiceImpl implements IExpressService {
	@Resource
	private IExpressDao expressDao;
	
	@Override
	public Express selectByExpressCode(String expressCode) {
		return expressDao.selectByPrimaryKey(expressCode);
	}

	/**
	 * 获取默认快递方式
	 */
	public Express selectDefaultExpress() {
		List<Express> list = expressDao.selectOrderList();
		return !list.isEmpty()?list.get(0):null;
	}
	/**
	 * 获取快递列表信息
	 * @return
	 */
	public List<Express> selectList(){
		return expressDao.selectOrderList();
	}

}
